// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'

import fastclick from 'fastclick'

import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import VueLazyLoad from 'vue-lazyload'
import axios from 'axios'
import Vueaxios from 'vue-axios'


Vue.use(axios, Vueaxios)


import 'common/stylus/index.styl'

Vue.use(VueLazyLoad, {
  loading: require('common/image/default.png')
})

fastclick.attach(document.body)

Vue.config.productionTip = false

// 封装api挂载vue原型中
import api from '@/request/api'
Vue.prototype.$api = api
console.log('api', api);

// 设置获取axios获取数据的默认路径
Vue.prototype.$axios = axios
/* eslint-disable no-new */


// vant

// import Toast from 'vant/lib/Toast';
// import 'vant/lib/index.css';

// Vue.use(Toast)

Vue.filter('songTags', val => {
  return val.join(',')
})


new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  template: '<App/>'
})
